package com.itheima.eurekaprovider.controller;



import cn.dm.pojo.User;
import cn.dm.service.FeignService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;


@RestController
public class RefactorHelloController implements FeignService {
    @Override
    public String hello(@RequestParam("name") String name) {
        String mid = "[学号:姓名:机器名]";
        return "Hello " + mid + name;
    }

    @Override
    public String hello(@RequestParam("name") String name, @RequestParam("age") Integer age) {
        String mid = "[学号:姓名:机器名]";
        return "Hello " + mid + name + " "+age;

    }

    @Override
    public String hello(@RequestBody User user) {
        String mid = "[学号:姓名:机器名]";
        return "Hello " + mid + user.getName() + ", " + user.getAge();

    }
}